﻿using IntroToMVCAugust19.Models;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;

namespace IntroToMVCAugust19.Controllers
{
    public class HomeController : Controller
    {
        public ActionResult Index()
        {

            Plane first = new Plane(3, "Turbo Prop", 2, 3); //create new plane in controller 


            return View(first);    //show people in the viewer
        }

        public ActionResult Tarmac()
        {
            List<Plane> planes = new List<Plane>()
            {
                new Plane(4, "Prop", 5, 2),
                new Plane(6, "Super Prop", 6, 7),
                new Plane(0, "Rubber Prop", 9, 5)
            };
            planes.Add(new Plane(5, "Turbo Prop", 2, 2));
            return View(planes);
        }
        public ActionResult About()
        {
            ViewBag.Message = "Your application description page.";

            return View();
        }

        public ActionResult Contact()
        {
            ViewBag.Message = "Your contact page.";

            return View();
        }
    }
}